<template>
    <div id="box"></div>
</template>

<script lang="ts" setup>
import { onMounted, toRefs } from "vue";

const props = defineProps({
    amisJson: {
        type: Object,
        required: true
    }
})

onMounted(() => {
    const { amisJson } = toRefs(props)
    const amis = amisRequire('amis/embed');
    const amisScoped = amis.embed('#box', amisJson.value);
    //将表单提交成功事件挂载到window对象，在amis中提交成功后调用
    // window.submitCollectSucc = () => {
    //     store.commit('Live/setHasCollectAudienceMsg', true)
    // }
    
})

</script>
